package com.lry;

import lombok.Data;

@Data
public class NodeValue {

    private String value;

    private Integer version;

    private String nodeName;

    public NodeValue(){}

    public NodeValue(String value,String nodeName) {
        this.value = value;
        this.version = 1;
        this.nodeName = nodeName;
    }

    public void incrVersion(){
        version++;
    }

    @Override
    public String toString() {
        return "NodeValue{" +
                "value='" + value + '\'' +
                ", version=" + version +
                ", nodeName='" + nodeName + '\'' +
                '}';
    }
}
